<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Hyun,<br>
<br>
<br>
</div>
<blockquote
cite="mid:E439C2F435589E4DA34D847245F141A4B1EB3A2E@XSJ-PSEXMBX01.xlnx.xilinx.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css" id="owaParaStyle"></style>
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">Hi Chris,
<div><br>
</div>
<div>I tried most of examples. Now I'm focusing on
glsl_simple.osgt as it looks simple, but only the second row
of shapes shows. If I modify the vertex shader a little, I get
to see both first/second row.</div>
</div>
</blockquote>
Can you tell us which platform you are using? You usually don't
have to add precision qualifiers to make shaders work. <br>
<blockquote
cite="mid:E439C2F435589E4DA34D847245F141A4B1EB3A2E@XSJ-PSEXMBX01.xlnx.xilinx.com"
type="cite">
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">
<div><br>
</div>
<div>I've received some OSG model (file.osg) from someone, and I
was able to run it on the desktop (OpenGL). I was told the OSG
model runs on OpenGLES2.0. For me to run it on OpenGLES2, I
added the precision qualifiers to build, but the result still
doesn't look correct. I'm not sure if more / what modification
is needed. For example, I modified the OSG shader generator,
but it didn't help. Does OSG layers completely abstract
underlying APIs (OpenGL, OpenGLES,,,), meaning the OSG models
are API independent? or does each OSG model have some API
specific code? For example, I don't see any precision
qualifiers in OSG examples, and does that mean those models
are not for OpenGLES2.0?</div>
</div>
</blockquote>
OSG doesn't completely abstract the APIs, but it can be built
specifically to work with OpenGL ES, by using the compiler flags you
used. You will however have to put some work into it, since you will
have to write shaders. Since you are not telling us which "shader
generator" you are using, it is hard to guess what you are trying to
achieve. <br>
There is not something like "models for OpenGLES2.0". You will have
to write appropriate shaders and might have to run some visitors to
change fixed function pipeline functions in to uniforms/attributes
of the model.<br>
For instance osg::Material is not working outside the compatibility
-profiles, so might have to run a visitor, that parses osg::Material
instances and replaces them with uniforms or per-vertex attributes
which you will have to evaluate in the shader. <br>
<br>
<blockquote
cite="mid:E439C2F435589E4DA34D847245F141A4B1EB3A2E@XSJ-PSEXMBX01.xlnx.xilinx.com"
type="cite">
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">
<div><br>
</div>
<div>I'm trying to figure out where the issue comes from: OSG
model, OSG layers, OpenGLES library.</div>
</div>
</blockquote>
<br>
Chris asked you for an example model that is not working. You
mentioned the glsl-simple model, which from a glance doesn't have
ES-compatible code. The easiest thing to do is to start with a
model(preferably not containing shaders) and a simple ES-Shader.<br>
Unfortunately the examples here are relatively rare. Might be a
great opportunity to create some minimalistic core/ES-based shader
example and to extend the OpenGL-ES pseudo loader. <br>
<br>
<blockquote
cite="mid:E439C2F435589E4DA34D847245F141A4B1EB3A2E@XSJ-PSEXMBX01.xlnx.xilinx.com"
type="cite">
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">
<div>Thanks,</div>
<div>-hyun <br>
</div>
</div>
</blockquote>
<br>
<br>
Cheers<br>
Sebastian <br>
<blockquote
cite="mid:E439C2F435589E4DA34D847245F141A4B1EB3A2E@XSJ-PSEXMBX01.xlnx.xilinx.com"
type="cite">
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">
<div><br>
<div style="font-family: Times New Roman; color: #000000;
font-size: 16px">
<hr tabindex="-1">
<div id="divRpF374469" style="direction: ltr;"><font
color="#000000" size="2" face="Tahoma"><b>From:</b>
osg-users [<a class="moz-txt-link-abbreviated" href="mailto:osg-users-bounces@lists.openscenegraph.org">osg-users-bounces@lists.openscenegraph.org</a>]
on behalf of Chris Hanson [<a class="moz-txt-link-abbreviated" href="mailto:xenon@alphapixel.com">xenon@alphapixel.com</a>]<br>
<b>Sent:</b> Friday, March 11, 2016 5:27 PM<br>
<b>To:</b> OpenSceneGraph Users<br>
<b>Subject:</b> Re: [osg-users] Running OSG models on
OpenGLES2.0<br>
</font><br>
</div>
<div>
<div dir="ltr">OGL ES requires a shader.
<div><br>
</div>
<div>Many of the OSG-Data models don't have shaders
built into them, and will not transform and rasterize
as a result.</div>
<div><br>
</div>
<div>Which OSG model did you try that had most surfaces
transparent?</div>
</div>
</div>
</div>
</div>
</div>
<br>
<br>
This email and any attachments are intended for the sole use of
the named recipient(s) and contain(s) confidential information
that may be proprietary, privileged or copyrighted under
applicable law. If you are not the intended recipient, do not
read, copy, or forward this email message or any attachments.
Delete this email message and any attachments immediately.
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
</blockquote>
<br>
</body>
</html>