﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3AAlexK%2FGsoc2012%2FDesign</id>
	<title>利用者:AlexK/Gsoc2012/Design - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3AAlexK%2FGsoc2012%2FDesign"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:AlexK/Gsoc2012/Design&amp;action=history"/>
	<updated>2026-07-05T07:10:46Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:AlexK/Gsoc2012/Design&amp;diff=136877&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:AlexK/Gsoc2012/Design&amp;diff=136877&amp;oldid=prev"/>
		<updated>2018-06-28T20:49:35Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 20:49時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:AlexK/Gsoc2012/Design&amp;diff=136876&amp;oldid=prev</id>
		<title>2012年6月5日 (火) 03:39にwiki&gt;AlexKによる</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:AlexK/Gsoc2012/Design&amp;diff=136876&amp;oldid=prev"/>
		<updated>2012-06-05T03:39:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=OpenGL and ES 2.0 integration=&lt;br /&gt;
==Intro==&lt;br /&gt;
First, the OpenGL ES 2.0 is very different from ES 1.1 and doesn't support fixed pipeline. Therefore we cannot just enable OpenGL ES 2.0 without ruining the code with  #ifdef.  On the bright side, it supports a lot of new features that are used in BGE. For example, we can reuse GLSL with some simplifications and allow python plugins &lt;br /&gt;
access to shaders. Also, according to Moguri, shadows are using FBOs available only in 2.0. The bigger problem is that 2.0 is not compatible with 1.1 which seriously &lt;br /&gt;
prevent porting to 2.0 in future.&lt;br /&gt;
==Matrices==&lt;br /&gt;
OpenGL ES 2.0 uses vertex shaders and don't have own shaders stack. I will implement shader stack as Jason and Brecht. It would be similar to usual OpenGL stack, but &lt;br /&gt;
instead will use BLI_math (which would be modified to speed up and support direct operations). glLoadMatrix will used for fixed pipeline to update the matrix. For ES &lt;br /&gt;
GLSL, glUniformMatrix4fv. GLU code for setting camera prespective, will be also ported from gle implementation. That way we will cover half of incompatibility.&lt;br /&gt;
==Technical Note==&lt;br /&gt;
To allow easily switching&lt;br /&gt;
* all matrix implementation will be moved to gpu_*&lt;br /&gt;
* It will be separated with #ifdef, allowing freely compile&lt;br /&gt;
* We will use pointer functions like in glew in order to load different implementation during start time&lt;br /&gt;
&lt;br /&gt;
==Material==&lt;br /&gt;
We have GLSL for BGE materials in Blender already. Code generation will be simplify for ES 2.0 profiles.&lt;br /&gt;
For basic materials and simple (solid color + texture) we will have our own shaders. This will be used mainly for UI and viewport when time will come.&lt;br /&gt;
&lt;br /&gt;
Before drawing, Blender will specify what it will need:&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
gpu_need_draw(BSH_COLOR_FLAT | BSH_TEXT1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Setting that we would need flat color and texture shader. We pick one out of list. For example, we don't have (BSH_COLOR_FLAT | BSH_TEXT1) shader, but we have (BSH_COLOR_FLAT | BSH_TEXT1 | BSH_TEXT2), we would use it. Another method, is to have compile it one the fly. But this wouldn't be for common usage as we would have a shader for each tiny element, which is not good for storing and sorting.&lt;br /&gt;
&lt;br /&gt;
Jason is working &amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;gpuColorEach_fixed(){glColorPointer ();}&amp;lt;/source&amp;gt;&lt;br /&gt;
For ES it will be like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
gpuColorEach_es()&lt;br /&gt;
{&lt;br /&gt;
    glVertexAttrib(curent_shader-&amp;gt;colorlocation ...);&lt;br /&gt;
    glEnableVertexAttribArray(curent_shader-&amp;gt;colorlocation);&lt;br /&gt;
    curent_shader-&amp;gt;doneattribures |= SH_COLOR;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When we ready do draw, we need to check if all attributes are set as we might gotten more complex shader than we needed to. All unset values are set to their defaults: color to black, texture to transparent.&lt;br /&gt;
&lt;br /&gt;
==Lights==&lt;br /&gt;
Lights are more complex with premaid. We can have sets of premaid shaders with 0, 1, 2, 4, 8, 16 number of lights. We can set intensity for unused light to 0. In this case we would have 6 sets with ~7 premaid shaders which is a lot of shaders. We can compile only these shaders which we need. &lt;br /&gt;
&lt;br /&gt;
As before, the same with light. We declare number of lights before hand and we choose appropriate shader set and set color before we draw.&lt;br /&gt;
&lt;br /&gt;
==Textures==&lt;br /&gt;
With textures, it is much simpler. The maximum number of textures which we will need is one-two. You shouldn't use more then that on mobile platform. If you need to, you can always use dynamic blender's GLSL.&lt;br /&gt;
&lt;br /&gt;
==Blender Code==&lt;br /&gt;
With some restriction, we can easily replace all functionality in blender with this encapsulation as it will be very similar in order. A little tedious, but  it should allow to run on OpenGL ES 2.0.&lt;/div&gt;</summary>
		<author><name>wiki&gt;AlexK</name></author>
		
	</entry>
</feed>