Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
angle
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
angle
Commits
376e1064
Commit
376e1064
authored
Mar 31, 2010
by
alokp@chromium.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for loops.
Review URL:
http://codereview.appspot.com/802047
git-svn-id:
https://angleproject.googlecode.com/svn/trunk@91
736b8ea6-26fd-11df-bfd4-992fa37f6226
parent
3d270782
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
2 deletions
+43
-2
OutputGLSL.cpp
src/compiler/OutputGLSL.cpp
+43
-2
No files found.
src/compiler/OutputGLSL.cpp
View file @
376e1064
...
@@ -467,8 +467,49 @@ bool TOutputGLSL::visitAggregate(Visit visit, TIntermAggregate* node)
...
@@ -467,8 +467,49 @@ bool TOutputGLSL::visitAggregate(Visit visit, TIntermAggregate* node)
bool
TOutputGLSL
::
visitLoop
(
Visit
visit
,
TIntermLoop
*
node
)
bool
TOutputGLSL
::
visitLoop
(
Visit
visit
,
TIntermLoop
*
node
)
{
{
UNIMPLEMENTED
();
TInfoSinkBase
&
out
=
objSink
();
return
true
;
// Loop header.
if
(
node
->
testFirst
())
// for loop
{
out
<<
"for ("
;
if
(
node
->
getInit
())
node
->
getInit
()
->
traverse
(
this
);
out
<<
"; "
;
ASSERT
(
node
->
getTest
()
!=
NULL
);
node
->
getTest
()
->
traverse
(
this
);
out
<<
"; "
;
if
(
node
->
getTerminal
())
node
->
getTerminal
()
->
traverse
(
this
);
out
<<
") {
\n
"
;
}
else
// do-while loop
{
out
<<
"do {
\n
"
;
}
// Loop body.
if
(
node
->
getBody
())
node
->
getBody
()
->
traverse
(
this
);
// Loop footer.
if
(
node
->
testFirst
())
// for loop
{
out
<<
"}
\n
"
;
}
else
// do-while loop
{
out
<<
"} while ("
;
ASSERT
(
node
->
getTest
()
!=
NULL
);
node
->
getTest
()
->
traverse
(
this
);
out
<<
");
\n
"
;
}
// No need to visit children. They have been already processed in
// this function.
return
false
;
}
}
bool
TOutputGLSL
::
visitBranch
(
Visit
visit
,
TIntermBranch
*
node
)
bool
TOutputGLSL
::
visitBranch
(
Visit
visit
,
TIntermBranch
*
node
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment