Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
64c89ee2
Commit
64c89ee2
authored
13 years ago
by
David Parks
Browse files
Options
Downloads
Patches
Plain Diff
SH-2908 Fix for mac build
parent
001e3207
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llrender/llgl.cpp
+9
-0
9 additions, 0 deletions
indra/llrender/llgl.cpp
indra/llrender/llvertexbuffer.cpp
+4
-0
4 additions, 0 deletions
indra/llrender/llvertexbuffer.cpp
with
13 additions
and
0 deletions
indra/llrender/llgl.cpp
+
9
−
0
View file @
64c89ee2
...
@@ -561,6 +561,15 @@ bool LLGLManager::initGL()
...
@@ -561,6 +561,15 @@ bool LLGLManager::initGL()
if
(
mGLVersion
>=
2.
f
)
if
(
mGLVersion
>=
2.
f
)
{
{
parse_glsl_version
(
mGLSLVersionMajor
,
mGLSLVersionMinor
);
parse_glsl_version
(
mGLSLVersionMajor
,
mGLSLVersionMinor
);
#if LL_DARWIN
//never use GLSL greater than 1.20 on OSX
if
(
mGLSLVersionMajor
>
1
||
mGLSLVersionMinor
>=
30
)
{
mGLSLVersionMajor
=
1
;
mGLSLVersionMinor
=
20
;
}
#endif
}
}
// Trailing space necessary to keep "nVidia Corpor_ati_on" cards
// Trailing space necessary to keep "nVidia Corpor_ati_on" cards
...
...
This diff is collapsed.
Click to expand it.
indra/llrender/llvertexbuffer.cpp
+
4
−
0
View file @
64c89ee2
...
@@ -1264,11 +1264,13 @@ void LLVertexBuffer::setupVertexArray()
...
@@ -1264,11 +1264,13 @@ void LLVertexBuffer::setupVertexArray()
if
(
attrib_integer
)
if
(
attrib_integer
)
{
{
#if !LL_DARWIN
//glVertexattribIPointer requires GLSL 1.30 or later
//glVertexattribIPointer requires GLSL 1.30 or later
if
(
gGLManager
.
mGLSLVersionMajor
>
1
||
gGLManager
.
mGLSLVersionMinor
>=
30
)
if
(
gGLManager
.
mGLSLVersionMajor
>
1
||
gGLManager
.
mGLSLVersionMinor
>=
30
)
{
{
glVertexAttribIPointer
(
i
,
attrib_size
[
i
],
attrib_type
[
i
],
sTypeSize
[
i
],
(
void
*
)
mOffsets
[
i
]);
glVertexAttribIPointer
(
i
,
attrib_size
[
i
],
attrib_type
[
i
],
sTypeSize
[
i
],
(
void
*
)
mOffsets
[
i
]);
}
}
#endif
}
}
else
else
{
{
...
@@ -2258,9 +2260,11 @@ void LLVertexBuffer::setupVertexBuffer(U32 data_mask)
...
@@ -2258,9 +2260,11 @@ void LLVertexBuffer::setupVertexBuffer(U32 data_mask)
if
(
data_mask
&
MAP_TEXTURE_INDEX
&&
if
(
data_mask
&
MAP_TEXTURE_INDEX
&&
(
gGLManager
.
mGLSLVersionMajor
>=
2
||
gGLManager
.
mGLSLVersionMinor
>=
30
))
//indexed texture rendering requires GLSL 1.30 or later
(
gGLManager
.
mGLSLVersionMajor
>=
2
||
gGLManager
.
mGLSLVersionMinor
>=
30
))
//indexed texture rendering requires GLSL 1.30 or later
{
{
#if !LL_DARWIN
S32
loc
=
TYPE_TEXTURE_INDEX
;
S32
loc
=
TYPE_TEXTURE_INDEX
;
void
*
ptr
=
(
void
*
)
(
base
+
mOffsets
[
TYPE_VERTEX
]
+
12
);
void
*
ptr
=
(
void
*
)
(
base
+
mOffsets
[
TYPE_VERTEX
]
+
12
);
glVertexAttribIPointer
(
loc
,
4
,
GL_UNSIGNED_BYTE
,
LLVertexBuffer
::
sTypeSize
[
TYPE_VERTEX
],
ptr
);
glVertexAttribIPointer
(
loc
,
4
,
GL_UNSIGNED_BYTE
,
LLVertexBuffer
::
sTypeSize
[
TYPE_VERTEX
],
ptr
);
#endif
}
}
if
(
data_mask
&
MAP_VERTEX
)
if
(
data_mask
&
MAP_VERTEX
)
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment